<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>公益捐赠</h2>
	</div>
	<div class="cf">
		<div class="fl">
            <a class="btn" href="{:U('Welfare/welfare_add')}">添加公益</a>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
    <thead>
        <tr>
			<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
			<th>标题</th>
			<th>目标</th>
			<th>捐款</th>
			<th>进度</th>
			<th>操作</th>
		</tr>
    </thead>
    <tbody>
		<notempty name="_list">
		<volist name="_list" id="v">
		<tr>
            <td>{$v.id}</td>
            <td>{$v.title}</td>
            <td>{$v.price}</td>
            <td>{$v.sum}</td>
            <td><if condition='$v[price] gt $v[sum]'>未完成<else />已完成</if></td>
            <td>
              <a href='{:U("welfare_info",array("id"=>$v[id]))}' title="查看">查看</a>
              <a href='{:U("welfare_update",array("id"=>$v[id]))}' title="编辑">编辑</a>
            </td>
		</tr>
		</volist>
		<else/>
		<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
	</div>
    <div class="page">
        {$_page}
    </div>
</block>